﻿using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Giraffe.Client.ConversationModule.Answer
{
    /// <summary>
    /// Interaction logic for AnswerControl.xaml
    /// </summary>
    [ExcludeFromCodeCoverage]
    public partial class AnswerControl : UserControl
    {
        public AnswerControl()
        {
            InitializeComponent();
            DataContextChanged += ThisDataContextChanged;
        }

        private AnswerVM ViewModel { get { return DataContext as AnswerVM; } }

        private void ThisDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            //Todo needs to be removed on .Net 4.0. KeyBinding.Command will be dependency property
            sendAnswerCommand.Command = ViewModel.SendAnswerCommand;
        }
    }
}
